/**
 * Created with IntelliJ IDEA.
 * User: mkadush
 * Date: 12.09.13
 * Time: 11:07
 * To change this template use File | Settings | File Templates.
 */
Ext.onReady(function () {

    var forms =[];
    forms.push(Ext.getCmp('formOrganization'));
    forms.push(Ext.getCmp('formDepartment'));
    forms.push(Ext.getCmp('formProject'));
    forms.push(Ext.getCmp('formPeople'));
    forms.push(Ext.getCmp('saveButtonPanel'));

    var mainViewport = new Ext.Viewport({
        layout: 'border',
        defaults: {
            split: true
        },
        items: [
            {
                xtype: 'container',
                region: 'west',
                width: 250,
                maxWidth: 400,
                minWidth: 200,

                layout: 'fit',
                id: 'westRegion'
            },

            {
                title: 'information',
                xtype: 'container',
                region: 'center',
                layout: 'anchor',
                id: 'centerRegion',
                items: forms

            }
        ]
    });

    var westRegion = Ext.getCmp('westRegion');
    westRegion.add(tree);
    westRegion.doLayout();

    var centerRegion = Ext.getCmp('centerRegion');
    for (var i= 0; i< centerRegion.items.getCount(); i++){
        centerRegion.items.itemAt(i).hide()
    }

});